Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <img src="planets.gif" width="145" height="126" usemap="#planetmap"> <map id="myMap" name="planetmap"> </map> <p>Click the button to create an AREA element with a link to "venus.htm".</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.createElement("AREA"); x.setAttribute("href", "venus.html"); x.setAttribute("shape", "circle"); x.setAttribute("coords", "124,58,8"); document.getElementById("myMap").appendChild(x); document.getElementById("demo").innerHTML = "The AREA element was created, and you can now click on the venus area in the image."; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_area_create by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 07:59:16 GMT --> </html>
Result:
Try it Yourself - © w3schools.com